<template>
  <div v-loading="loading" class="timeout-wrap">
    <EmptyData v-if="res?.length === 0" />
    <template v-else v-for="item in res" :key="item.id">
      <EventsItem :item="item" />
    </template>
  </div>
</template>

<script lang="ts" setup>
import EventsItem from '../EventsItem.vue'
import useFetch from '@/hooks/useFetch'
import { generatePageParams } from '@screen/utils/index'
import { getAllMatterFocus } from '@screen/apis'
import EmptyData from '../EmptyData.vue'

const { loading, res } = useFetch<Record<string, any>[]>(
  getAllMatterFocus,
  generatePageParams(true),
  true,
  true,
)
</script>

<style lang="scss" scoped>
.timeout-wrap {
  height: vh(272);
  padding: vh(20) vw(18) vh(8);
}
</style>
